package com.objects;

import java.util.Comparator;

public class SeatMapComparator implements Comparator<SeatMap> {


	public int compare(SeatMap o1, SeatMap o2) {

		int rowCompare = String.valueOf(o1.getRow()).compareTo(String.valueOf(o2.getRow()));
		
		if (rowCompare !=0){
			return rowCompare;
		}else{
			return String.valueOf(o2.getCol()).compareTo( String.valueOf(o1.getCol()));
		}
	}




}
